package com.wicket.okrapp.biz.service.dto.common;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc OpenConfItemResultDto
 * @使用场景
 */
@Data
public class OpenConfItemResultDto extends BaseDto implements Serializable {

    /**
     * 配置方案ID:
     */
    @NotNull(message = "配置方案ID 不能为空")
    @ApiModelProperty("配置方案ID ")
    private String confSchemeId;

    /**
     * 配置项标识:
     */
    @NotNull(message = "配置项标识不能为空")
    @ApiModelProperty("配置项标识")
    private String confItemCode;

    /**
     * 结果值:
     */
    @NotNull(message = "结果值不能为空")
    @ApiModelProperty("结果值")
    private String endValue;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        OpenConfItemResultDto that = (OpenConfItemResultDto) o;
        return confSchemeId == that.confSchemeId && confItemCode == that.confItemCode && endValue == that.endValue;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), confSchemeId, confItemCode, endValue);
    }

}
